#ifndef _MAILBOXES_H
#define _MAILBOXES_H

/*****************************************************************************
 * Includes                                                                  *
 *****************************************************************************/

#include "test_configuration.h"
#include "Tasks.h"

/*****************************************************************************
 * Macros Definitions                                                        *
 *****************************************************************************/

/* MailboxIDs */
#define MAILBOX1 0
#define MAILBOX2 1
#define MAILBOX3 2

/* Sizes */
#define mailboxSize 3
#define waitedSize  3

/*****************************************************************************
 * Objects Definitions                                                       *
 *****************************************************************************/

typedef struct MAILBOX_ELEMENTS 
{
 unsigned char u8bandera;
 unsigned char dato;
} MAILBOX;

/*****************************************************************************
 * Global Variables                                                          *
 *****************************************************************************/ 

extern MAILBOX mailboxArray[mailboxSize];
extern TASK  waitedTasks [waitedSize];

/*****************************************************************************
 * Function Prototypes                                                       *
 *****************************************************************************/

void activaMailbox(unsigned char mailboxID, unsigned char dato);
void sendWaitedTask(void);
void initializeWaitedTasks(void);
void initializeMailboxArray(void);
void tomaMailbox(unsigned char mailboxID);
void activateWaited(TASK* thisTask);

#endif /* _MAILBOXES_H */